home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'Outline.pas' rev: 3.00
-
- #ifndef OutlineHPP
- #define OutlineHPP
- #include <SysUtils.hpp>
- #include <Controls.hpp>
- #include <Grids.hpp>
- #include <StdCtrls.hpp>
- #include <Menus.hpp>
- #include <Graphics.hpp>
- #include <Classes.hpp>
- #include <Forms.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Outline
- {
- //-- type declarations -------------------------------------------------------
- class DELPHICLASS OutlineError;
- class PASCALIMPLEMENTATION OutlineError : public System::TObject
- {
- typedef System::TObject inherited;
-
- public:
- /* TObject.Create */ __fastcall OutlineError(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~OutlineError(void) { }
-
- };
-
- class DELPHICLASS EOutlineError;
- class PASCALIMPLEMENTATION EOutlineError : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EOutlineError(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOutlineError(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOutlineError(const System::AnsiString Msg, int AHelpContext)
- : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOutlineError(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOutlineError(void) { }
-
- };
-
- enum TOutlineNodeCompare { ocLess, ocSame, ocGreater, ocInvalid };
-
- enum TAttachMode { oaAdd, oaAddChild, oaInsert };
-
- typedef Shortint TChangeRange;
-
- class DELPHICLASS TOutlineNode;
- class DELPHICLASS TCustomOutline;
- enum TOutlineBitmap { obPlus, obMinus, obOpen, obClose, obLeaf };
-
- typedef Set<TOutlineBitmap, obPlus, obLeaf> TOutlineBitmaps;
-
- typedef Graphics::TBitmap* TBitmapArray[5];
-
- typedef void __fastcall (__closure *EOutlineChange)(System::TObject* Sender, int Index);
-
- enum TOutlineStyle { osText, osPlusMinusText, osPictureText, osPlusMinusPictureText, osTreeText, osTreePictureText
- };
-
- enum TOutlineType { otStandard, otOwnerDraw };
-
- enum TOutlineOption { ooDrawTreeRoot, ooDrawFocusRect, ooStretchBitmaps };
-
- typedef Set<TOutlineOption, ooDrawTreeRoot, ooStretchBitmaps> TOutlineOptions;
-
- class PASCALIMPLEMENTATION TCustomOutline : public Grids::TCustomGrid
- {
- typedef Grids::TCustomGrid inherited;
-
- private:
- bool FBlockInsert;
- TOutlineNode* FRootNode;
- TOutlineNode* FGoodNode;
- int UpdateCount;
- TOutlineNode* FCurItem;
- System::AnsiString FSeparator;
- int FFontSize;
- Classes::TStrings* FStrings;
- TOutlineBitmaps FUserBitmaps;
- TOutlineBitmaps FOldBitmaps;
- Graphics::TBitmap* FPictures[5];
- EOutlineChange FOnExpand;
- EOutlineChange FOnCollapse;
- TOutlineStyle FOutlineStyle;
- int FItemHeight;
- TOutlineType FStyle;
- TOutlineOptions FOptions;
- bool FIgnoreScrollResize;
- TOutlineNode* FSelectedItem;
- Stdctrls::TDrawItemEvent FOnDrawItem;
- bool FSettingWidth;
- bool FSettingHeight;
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- int __fastcall GetItemCount(void);
- int __fastcall AttachNode(int Index, System::AnsiString Str, void * Ptr, TAttachMode AttachMode);
- TOutlineNode* __fastcall Get(int Index);
- int __fastcall GetSelectedItem(void);
- void __fastcall SetSelectedItem(int Value);
- TOutlineNodeCompare __fastcall CompareNodes(TOutlineNode* Value1, TOutlineNode* Value2);
- void __fastcall Error(const System::AnsiString ErrorString);
- HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
- bool __fastcall ResizeGrid(void);
- void __fastcall DoExpand(TOutlineNode* Node);
- void __fastcall Init(void);
- void __fastcall MoveNode(int Destination, int Source, TAttachMode AttachMode);
- void __fastcall ClearBitmap(Graphics::TBitmap* &Bitmap, TOutlineBitmap Kind);
- void __fastcall ChangeBitmap(Graphics::TBitmap* Value, TOutlineBitmap Kind);
- void __fastcall SetRowHeight(void);
- void __fastcall SetCurItem(int Value);
- void __fastcall CreateGlyph(void);
- void __fastcall SetStrings(Classes::TStrings* Value);
- Classes::TStrings* __fastcall GetStrings(void);
- bool __fastcall IsCurItem(int Value);
- void __fastcall SetPicture(int Index, Graphics::TBitmap* Value);
- Graphics::TBitmap* __fastcall GetPicture(int Index);
- void __fastcall DrawPictures(Graphics::TBitmap* const * BitMaps, const int BitMaps_Size, const Windows::TRect
- &ARect);
- void __fastcall DrawText(TOutlineNode* Node, const Windows::TRect &Rect);
- void __fastcall SetOutlineStyle(TOutlineStyle Value);
- void __fastcall DrawTree(const Windows::TRect &ARect, TOutlineNode* Node);
- void __fastcall SetItemHeight(int Value);
- void __fastcall SetStyle(TOutlineType Value);
- void __fastcall SetOutlineOptions(TOutlineOptions Value);
- bool __fastcall StoreBitmap(int Index);
- void __fastcall ReadBinaryData(Classes::TStream* Stream);
- void __fastcall WriteBinaryData(Classes::TStream* Stream);
- void __fastcall SetHorzScrollBar(void);
- void __fastcall ResetSelectedItem(void);
- void __fastcall SetRowFromNode(TOutlineNode* Node);
-
- protected:
- virtual void __fastcall Loaded(void);
- DYNAMIC void __fastcall Click(void);
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall KeyPress(char &Key);
- TOutlineNode* __fastcall SetGoodIndex(TOutlineNode* Value);
- virtual void __fastcall DrawCell(int ACol, int ARow, const Windows::TRect &ARect, Grids::TGridDrawState
- AState);
- DYNAMIC void __fastcall DblClick(void);
- void __fastcall SetLevel(TOutlineNode* Node, Cardinal CurLevel, Cardinal NewLevel);
- bool __fastcall BadIndex(TOutlineNode* Value);
- void __fastcall DeleteNode(TOutlineNode* Node, int CurIndex);
- DYNAMIC void __fastcall Expand(int Index);
- DYNAMIC void __fastcall Collapse(int Index);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- void __fastcall Move(int Destination, int Source, TAttachMode AttachMode);
- void __fastcall SetDisplayWidth(int Value);
- __property Classes::TStrings* Lines = {read=GetStrings, write=SetStrings};
- __property TOutlineStyle OutlineStyle = {read=FOutlineStyle, write=SetOutlineStyle, default=5};
- __property EOutlineChange OnExpand = {read=FOnExpand, write=FOnExpand};
- __property EOutlineChange OnCollapse = {read=FOnCollapse, write=FOnCollapse};
- __property TOutlineOptions Options = {read=FOptions, write=SetOutlineOptions, default=3};
- __property TOutlineType Style = {read=FStyle, write=SetStyle, default=0};
- __property int ItemHeight = {read=FItemHeight, write=SetItemHeight, nodefault};
- __property Stdctrls::TDrawItemEvent OnDrawItem = {read=FOnDrawItem, write=FOnDrawItem};
- __property System::AnsiString ItemSeparator = {read=FSeparator, write=FSeparator};
- __property Graphics::TBitmap* PicturePlus = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
- index=0};
- __property Graphics::TBitmap* PictureMinus = {read=GetPicture, write=SetPicture, stored=StoreBitmap
- , index=1};
- __property Graphics::TBitmap* PictureOpen = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
- index=2};
- __property Graphics::TBitmap* PictureClosed = {read=GetPicture, write=SetPicture, stored=StoreBitmap
- , index=3};
- __property Graphics::TBitmap* PictureLeaf = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
- index=4};
-
- public:
- __fastcall virtual TCustomOutline(Classes::TComponent* AOwner);
- __fastcall virtual ~TCustomOutline(void);
- int __fastcall Add(int Index, const System::AnsiString Text);
- int __fastcall AddChild(int Index, const System::AnsiString Text);
- int __fastcall AddChildObject(int Index, const System::AnsiString Text, const void * Data);
- int __fastcall AddObject(int Index, const System::AnsiString Text, const void * Data);
- HIDESBASE int __fastcall Insert(int Index, const System::AnsiString Text);
- int __fastcall InsertObject(int Index, const System::AnsiString Text, const void * Data);
- void __fastcall Delete(int Index);
- int __fastcall GetDataItem(void * Value);
- int __fastcall GetItem(int X, int Y);
- int __fastcall GetNodeDisplayWidth(TOutlineNode* Node);
- int __fastcall GetTextItem(const System::AnsiString Value);
- TOutlineNode* __fastcall GetVisibleNode(int Index);
- void __fastcall FullExpand(void);
- void __fastcall FullCollapse(void);
- void __fastcall LoadFromFile(const System::AnsiString FileName);
- void __fastcall LoadFromStream(Classes::TStream* Stream);
- void __fastcall SaveToFile(const System::AnsiString FileName);
- void __fastcall SaveToStream(Classes::TStream* Stream);
- void __fastcall BeginUpdate(void);
- void __fastcall EndUpdate(void);
- void __fastcall SetUpdateState(bool Value);
- void __fastcall Clear(void);
- __property int ItemCount = {read=GetItemCount, nodefault};
- __property TOutlineNode* Items[int Index] = {read=Get/*, default*/};
- __property int SelectedItem = {read=GetSelectedItem, write=SetSelectedItem, nodefault};
- __property Row ;
- __property Canvas ;
- public:
- /* TWinControl.CreateParented */ __fastcall TCustomOutline(HWND ParentWindow) : Grids::TCustomGrid(
- ParentWindow) { }
-
- };
-
- class PASCALIMPLEMENTATION TOutlineNode : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TList* FList;
- System::AnsiString FText;
- void *FData;
- TOutlineNode* FParent;
- int FIndex;
- bool FState;
- TCustomOutline* FOutline;
- int FExpandCount;
- void __fastcall ChangeExpandedCount(int Value);
- void __fastcall CloseNode(void);
- void __fastcall Clear(void);
- void __fastcall Error(const System::AnsiString ErrorString);
- int __fastcall GetExpandedNodeCount(void);
- System::AnsiString __fastcall GetFullPath(void);
- int __fastcall GetIndex(void);
- int __fastcall GetLastIndex(void);
- Cardinal __fastcall GetLevel(void);
- Classes::TList* __fastcall GetList(void);
- Cardinal __fastcall GetMaxDisplayWidth(Cardinal Value);
- TOutlineNode* __fastcall GetNode(int Index);
- int __fastcall GetTopItem(void);
- TOutlineNode* __fastcall GetVisibleParent(void);
- bool __fastcall HasChildren(void);
- bool __fastcall HasVisibleParent(void);
- bool __fastcall IsEqual(TOutlineNode* Value);
- void __fastcall ReIndex(TOutlineNode* StartNode, TOutlineNode* EndNode, int NewIndex, bool IncludeStart
- );
- void __fastcall Repaint(void);
- bool __fastcall Resync(int &NewIndex, TOutlineNode* EndNode);
- void __fastcall SetExpandedState(bool Value);
- void __fastcall SetGoodIndex(void);
- void __fastcall SetHorzScrollBar(void);
- void __fastcall SetLevel(Cardinal Level);
- void __fastcall SetText(const System::AnsiString Value);
-
- protected:
- __fastcall TOutlineNode(TCustomOutline* AOwner);
- __fastcall virtual ~TOutlineNode(void);
- TOutlineNode* __fastcall GetVisibleNode(int TargetCount);
- int __fastcall AddNode(TOutlineNode* Value);
- int __fastcall InsertNode(int Index, TOutlineNode* Value);
- TOutlineNode* __fastcall GetNodeAtIndex(int TargetIndex);
- int __fastcall GetDataItem(void * Value);
- int __fastcall GetTextItem(const System::AnsiString Value);
- bool __fastcall HasAsParent(TOutlineNode* Value);
- bool __fastcall GetRowOfNode(TOutlineNode* TargetNode, int &RowCount);
- void __fastcall InternalRemove(TOutlineNode* Value, int Index);
- void __fastcall Remove(TOutlineNode* Value);
- void __fastcall WriteNode(char * Buffer, Classes::TStream* Stream);
- __property TCustomOutline* Outline = {read=FOutline};
- __property Classes::TList* List = {read=GetList};
- __property int ExpandCount = {read=FExpandCount, nodefault};
- __property TOutlineNode* Items[int Index] = {read=GetNode/*, default*/};
-
- public:
- void __fastcall ChangeLevelBy(TChangeRange Value);
- void __fastcall Collapse(void);
- void __fastcall Expand(void);
- void __fastcall FullExpand(void);
- int __fastcall GetDisplayWidth(void);
- int __fastcall getFirstChild(void);
- int __fastcall GetLastChild(void);
- int __fastcall GetNextChild(int Value);
- int __fastcall GetPrevChild(int Value);
- void __fastcall MoveTo(int Destination, TAttachMode AttachMode);
- __property TOutlineNode* Parent = {read=FParent};
- __property bool Expanded = {read=FState, write=SetExpandedState, nodefault};
- __property System::AnsiString Text = {read=FText, write=SetText};
- __property void * Data = {read=FData, write=FData};
- __property int Index = {read=GetIndex, nodefault};
- __property Cardinal Level = {read=GetLevel, write=SetLevel, nodefault};
- __property bool HasItems = {read=HasChildren, nodefault};
- __property bool IsVisible = {read=HasVisibleParent, nodefault};
- __property int TopItem = {read=GetTopItem, nodefault};
- __property System::AnsiString FullPath = {read=GetFullPath};
- };
-
- typedef Shortint TBitmapArrayRange;
-
- class DELPHICLASS TOutline;
- class PASCALIMPLEMENTATION TOutline : public Outline::TCustomOutline
- {
- typedef Outline::TCustomOutline inherited;
-
- __published:
- __property Lines ;
- __property OutlineStyle ;
- __property OnExpand ;
- __property OnCollapse ;
- __property Options ;
- __property Style ;
- __property ItemHeight ;
- __property OnDrawItem ;
- __property Align ;
- __property Enabled ;
- __property Font ;
- __property Color ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property Ctl3D ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property OnClick ;
- __property DragMode ;
- __property DragCursor ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnStartDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnDblClick ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property BorderStyle ;
- __property ItemSeparator ;
- __property PicturePlus ;
- __property PictureMinus ;
- __property PictureOpen ;
- __property PictureClosed ;
- __property PictureLeaf ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property ShowHint ;
- __property PopupMenu ;
- __property ScrollBars ;
- public:
- /* TCustomOutline.Create */ __fastcall virtual TOutline(Classes::TComponent* AOwner) : Outline::TCustomOutline(
- AOwner) { }
- /* TCustomOutline.Destroy */ __fastcall virtual ~TOutline(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TOutline(HWND ParentWindow) : Outline::TCustomOutline(ParentWindow
- ) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
-
- } /* namespace Outline */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Outline;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Outline
-